#include "Stdafx.h"
#include "vcclr.h"
#include <string>

using namespace System;
using namespace System::Runtime::InteropServices;

namespace SQMarketApiWrapper
{
	char* StringToCharPoint(String^ s)
	{
		IntPtr ptr = Marshal::StringToHGlobalAnsi(s);
		void* stemp = ptr.ToPointer();
		return static_cast<char*>(stemp);
	}
	String^ StringFromCharPoint(char *p)
	{
		return Marshal::PtrToStringAnsi(System::IntPtr((void*)p));
	}
	void FreeHGlobalChar(char* p)
	{
		Marshal::FreeHGlobal(IntPtr((void*)p));
	}
}